Don't return G_TYPE_INVALID as a pointer
authorMatthias Clasen <mclasen@redhat.com>
Sun, 22 Mar 2015 19:19:59 +0000 (15:19 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Sun, 22 Mar 2015 19:19:59 +0000 (15:19 -0400)
Use NULL for g_return_val_if_fail checks if the function returns
a pointer. Pointed out by clang.

gtk/gtkwidgetpath.c

index 7d1019980bf280e9c4c924ecafe6f5721b190940..8f3ae065a2b682572051b4845bed3968e421170a 100644 (file)
@@ -497,8 +497,8 @@ gtk_widget_path_iter_get_siblings (const GtkWidgetPath *path,
 {
   GtkPathElement *elem;
 
-  g_return_val_if_fail (path != NULL, G_TYPE_INVALID);
-  g_return_val_if_fail (path->elems->len != 0, G_TYPE_INVALID);
+  g_return_val_if_fail (path != NULL, NULL);
+  g_return_val_if_fail (path->elems->len != 0, NULL);
 
   if (pos < 0 || pos >= path->elems->len)
     pos = path->elems->len - 1;